//==========================================================================
// Copyright (c) 2000-2008,  Elastos, Inc.  All Rights Reserved.
//==========================================================================
//
// Locations of the flags in the ARM PSR register.
//
#ifndef __ELASTOS_ARM_ASM_H__
#define __ELASTOS_ARM_ASM_H__

//symbol related
#define C_SYMBOL(symbol)    _##symbol

//stack related
#define HwMyStack_rom                   0x10001000  // user stack in rom mode
#define HwMyStack                       0x60001000  // user stack

//
// comport related
//
// 115200baud, 8bits/ch no parity, 1 stop bit
#define HwUartControlRate115200         0x00000001
#define HwUartControlDataLength8        0x00060000
#define HwUartControlRate115200_13      0x000
#define HwUartControlDataLength8        0x00060000

// mode related
#define ArmMaskMode                     0x0000001F
#define ArmSVCMode                      0x00000013

//
// The base address of the hardware registers in ARM memory.
//
#define HwBasePhysAddress               0x80000000
#define HwBaseAddress                   0x80000000

// hardware control define
#define HwControlUartEnable             0x00000100
#define HwControl                       0x00000100
#define HwStatus2                       0x00001140
#define HwUartControl                   0x000004C0

// memory related
#define ArmMmuControlMandatory          0x00000040
#define ArmMmuControl32BitDataEnable    0x00000020
#define ArmMmuControl32BitCodeEnable    0x00000010

#define ArmMmuCP                        p15
#define ArmMmuControl                   c1

#endif // __ELASTOS_ARM_ASM_H__
